package com.atguigu.array;

public class TestStudent {
    public static void main(String[] args) {
        //Student[] students = {new Student("张三",89), new Student("李四",84), new Student("王五",90)};

        Student s1 = new Student("张三", 89);
        Student s2 = new Student("李四",84);
        Student s3 = new Student("王五",90);
        Student[] students = {s1, s2, s3};

        for (int i = 0; i < students.length; i++) {
           // System.out.println(students[i]);//这么写看到的是3个对象地址值
          //  System.out.println("姓名：" + students[i].getName() +"，成绩：" + students[i].getScore());
            System.out.println(students[i].display());
        }
    }
}
